<template>
	<view class="content">
		<view><image @click="goBack()" v-show="index!=0" class="image" src="../../static/images/icon/right_icon.png"></image></view>
		<text class="title">{{ title }}</text>
		<view></view>
	</view>
</template>

<script>
export default {
	props:['index','title'],
	name: 'toolbar',
	data() {
		return {
		};
	},
	onLoad() {},
	methods: {
		goBack() {
			this.$parent.openIndex();
		}
	}
};
</script>

<style>
.content {
	box-sizing: border-box;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	text-align: center;
	width: 100%;
	height: 160rpx;
	background-color: #f8f8f8;
	padding: var(--status-bar-height) 40rpx 0 40rpx;
}
.image {
	width: 32rpx;
	height: 32rpx;
	rotate: 180deg;
}
.title {
	font-size: 32rpx;
}
</style>
